<el-dialog title="续费" v-model="renewalFormDialog" >
    <el-form ref="renewalForm" :label-position="'top'" :model="renewalForm">
        
        <el-form-item label="购买过的商品" v-if="buyHistory.length">
            <p v-for=" item in buyHistory ">
                {{item.product_name}}-{{item.product_money}}
            </p>
        </el-form-item>
        <el-form-item v-else>
            还没有购买过。请先购买
        </el-form-item>

        <el-form-item label="详细地址:" prop="address">
            <el-input type="textarea" placeholder="详细地址" v-model="renewalForm.address"></el-input>
        </el-form-item>

        <el-form-item label="商品:" prop="product_index">
            <el-select placheholder="请选择" v-model="renewalForm.product_index" @change="renewalSelectChange">
                <el-option v-for="(product,index) in products" :label="product.name" :value="index"></el-option>
            </el-select>
        </el-form-item>
        <el-form-item label="价格:" prop="product_money">
            <el-col :span="10">
                <el-input placeholder="价格" v-model="renewalForm.product_money"></el-input>
            </el-col>
        </el-form-item>
        <el-form-item label="够买时间"  prop="buy_time" required>
           <el-date-picker v-model="renewalForm.buy_time" :editable="false" type="date" placeholder="选择日期">
           </el-date-picker>
        </el-form-item>

        <el-form-item>
            <el-button type="primary"  @click="renewalFormSubmit(page.addRenewalFormUrl, 'renewal')">确 定</el-button>
        </el-form-item>
    </el-form>
</el-dialog>